<template>
  <j-modal :title="title" :width="width" :visible="visible" switchFullscreen   @ok="handleOk"  @cancel="handleCancel">
    <ene-arrival-storage-form
      ref="purchasing"
      @ok="submitCallback"
      @cancel="handleCancel"
      :disabled="disableSubmit"
    ></ene-arrival-storage-form>
    <!--    <div style="display: flex;justify-content: end;margin:10px 0px;">
      <a-button @click="close" style="margin-right:5px;">取消</a-button>
      <a-button @click="check0" style="margin-right:5px;">审核拒绝</a-button>
      <a-button type="primary" @click="check1">审核通过</a-button>
    </div>-->
  </j-modal>
</template>
<script>
import EneArrivalStorageForm from '@views/warehouse/modules/EneArrivalStorageForm'

export default {
  name: 'EneArrivalStorageModal',
  components: {
    EneArrivalStorageForm
  },
  data() {
    return {
      title: '',
      width: 1200,
      visible: false,
      disableSubmit: false
    }
  },
  methods:{
    handleOk(){
      this.$refs.purchasing.handleOk();
    },
    check(record) {
      this.visible = true
      this.$nextTick(() => {
        this.$refs.purchasing.check(record)
      })
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    submitCallback() {
      this.$emit('ok')
      this.visible = false
    },
/*    handleOk() {
      this.$refs.purchasing.submitForm()
    },*/
    handleCancel() {
      this.close()
    },

  }
}
</script>

<style scoped></style>
